package com.sk.sourcecircle.utils;

import android.graphics.Color;
import android.support.design.widget.Snackbar;
import android.view.View;

/**
 * Created by sk on 2018/1/16.
 */

public class SnackUtils {


    public static void show(View content, String tip) {
        Snackbar snackbar = Snackbar.make(content,
                tip, Snackbar.LENGTH_SHORT);
        View view = snackbar.getView();
        view.setBackgroundColor(Color.parseColor("#219021"));
        snackbar.show();
    }


    public static void showError(View content, String tip) {
        Snackbar snackbar = Snackbar.make(content,
                tip, Snackbar.LENGTH_SHORT);
        View view = snackbar.getView();
        view.setBackgroundColor(Color.parseColor("#ff5050"));
        snackbar.show();
    }

}
